package com.teamall.web.family.db.arg;

import java.util.*;
import java.math.*;
import org.apache.commons.lang.*;

public class ProjectFamilyRelatedArg {
    private String pk_name = "RELATED_ID";

    private String orderByClause;

    private String groupByClause;

    private String columns;

    private String countsql1;

    private String countsql2;

    private boolean distinct;

    private int rowStart = 0;

    private int rowEnd = 10;

    private List<ProjectFamilyRelatedCriteria> oredCriteria;

    public ProjectFamilyRelatedArg() {
        oredCriteria = new ArrayList<ProjectFamilyRelatedCriteria>();
    }

    public void setPk_name(String pk_name) {
        this.pk_name = StringEscapeUtils.escapeSql(pk_name);
    }

    public String getPk_name() {
        return pk_name;
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = StringEscapeUtils.escapeSql(orderByClause);
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setGroupByClause(String groupByClause) {
        this.groupByClause = StringEscapeUtils.escapeSql(groupByClause);
    }

    public String geGroupByClause() {
        return groupByClause;
    }

    public void setColumns(String columns) {
        this.columns = StringEscapeUtils.escapeSql(columns);
    }

    public String geColumns() {
        return columns;
    }

    public void setCountsql1(String countsql1) {
        this.countsql1 = StringEscapeUtils.escapeSql(countsql1);
    }

    public String geCountsql1() {
        return countsql1;
    }

    public void setCountsql2(String countsql2) {
        this.countsql2 = StringEscapeUtils.escapeSql(countsql2);
    }

    public String geCountsql2() {
        return countsql2;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public void setRowStart(int rowStart) {
        this.rowStart = rowStart;
    }

    public void setRowEnd(int rowEnd) {
        this.rowEnd = rowEnd;
    }

    public int getRowStart() {
        return rowStart;
    }

    public int getRowEnd() {
        return rowEnd;
    }

    public List<ProjectFamilyRelatedCriteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(ProjectFamilyRelatedCriteria criteria) {
        oredCriteria.add(criteria);
    }

    public ProjectFamilyRelatedCriteria or() {
    	ProjectFamilyRelatedCriteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public ProjectFamilyRelatedCriteria createCriteria() {
    	ProjectFamilyRelatedCriteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected ProjectFamilyRelatedCriteria createCriteriaInternal() {
    	ProjectFamilyRelatedCriteria criteria = new ProjectFamilyRelatedCriteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        groupByClause = null;
        columns = null;
        countsql1 = null;
        countsql2 = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<ProjectFamilyRelatedCriterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<ProjectFamilyRelatedCriterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<ProjectFamilyRelatedCriterion> getAllCriteria() {
            return criteria;
        }

        public List<ProjectFamilyRelatedCriterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new ProjectFamilyRelatedCriterion(condition));
        }

        protected void addCriterion(String condition, Object value,
                String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new ProjectFamilyRelatedCriterion(condition, value));
        }

        protected void addCriterion(String condition, Object value,
                String property, int likeType) {
            if (value == null) {
                throw new RuntimeException("Value for " + property
                        + " cannot be null");
            }
            criteria.add(new ProjectFamilyRelatedCriterion(condition, value, likeType));
        }

        protected void addCriterion(String condition, Object value1,
                Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property
                        + " cannot be null");
            }
            criteria.add(new ProjectFamilyRelatedCriterion(condition, value1, value2));
        }

        public ProjectFamilyRelatedCriteria andCriterionEqualTo(String criterion) {
            if (StringUtils.isBlank(criterion)) {
                criterion = "1=1";
            }
            addCriterion(criterion);
            return (ProjectFamilyRelatedCriteria) this;
        }
        public ProjectFamilyRelatedCriteria andRelatedIdIsNull() {
            addCriterion("RELATED_ID is null");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdIsNotNull() {
            addCriterion("RELATED_ID is not null");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdEqualTo(Integer value) {
            addCriterion("RELATED_ID =", value, "RELATED_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdNotEqualTo(Integer value) {
            addCriterion("RELATED_ID <>", value, "RELATED_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdGreaterThan(Integer value) {
            addCriterion("RELATED_ID >", value, "RELATED_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("RELATED_ID >=", value, "RELATED_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdLessThan(Integer value) {
            addCriterion("RELATED_ID <", value, "RELATED_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdLessThanOrEqualTo(Integer value) {
            addCriterion("RELATED_ID <=", value, "RELATED_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdLike(Integer value) {
            addCriterion("RELATED_ID like ", value, "RELATED_ID", 1);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdNotLike(Integer value) {
            addCriterion("RELATED_ID  not like ", value, "RELATED_ID", 1);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdLeftLike(Integer value) {
            addCriterion("RELATED_ID like ", value, "RELATED_ID", 0);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdNotLeftLike(Integer value) {
            addCriterion("RELATED_ID  not like ", value, "RELATED_ID", 0);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdRightLike(Integer value) {
            addCriterion("RELATED_ID like ", value, "RELATED_ID", 2);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdNotRightLike(Integer value) {
            addCriterion("RELATED_ID  not like ", value, "RELATED_ID", 2);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdIn(List<Integer> values) {
            addCriterion("RELATED_ID  in ", values, "RELATED_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdNotIn(List<Integer> values) {
            addCriterion("RELATED_ID not in ", values, "RELATED_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdBetween(Integer value1, Integer value2) {
            addCriterion("RELATED_ID between ", value1, value2, "RELATED_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andRelatedIdNotBetween(Integer value1, Integer value2) {
            addCriterion("RELATED_ID not between ", value1, value2, "RELATED_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }
        public ProjectFamilyRelatedCriteria andProjectIdIsNull() {
            addCriterion("PROJECT_ID is null");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdIsNotNull() {
            addCriterion("PROJECT_ID is not null");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdEqualTo(Integer value) {
            addCriterion("PROJECT_ID =", value, "PROJECT_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdNotEqualTo(Integer value) {
            addCriterion("PROJECT_ID <>", value, "PROJECT_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdGreaterThan(Integer value) {
            addCriterion("PROJECT_ID >", value, "PROJECT_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("PROJECT_ID >=", value, "PROJECT_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdLessThan(Integer value) {
            addCriterion("PROJECT_ID <", value, "PROJECT_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdLessThanOrEqualTo(Integer value) {
            addCriterion("PROJECT_ID <=", value, "PROJECT_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdLike(Integer value) {
            addCriterion("PROJECT_ID like ", value, "PROJECT_ID", 1);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdNotLike(Integer value) {
            addCriterion("PROJECT_ID  not like ", value, "PROJECT_ID", 1);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdLeftLike(Integer value) {
            addCriterion("PROJECT_ID like ", value, "PROJECT_ID", 0);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdNotLeftLike(Integer value) {
            addCriterion("PROJECT_ID  not like ", value, "PROJECT_ID", 0);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdRightLike(Integer value) {
            addCriterion("PROJECT_ID like ", value, "PROJECT_ID", 2);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdNotRightLike(Integer value) {
            addCriterion("PROJECT_ID  not like ", value, "PROJECT_ID", 2);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdIn(List<Integer> values) {
            addCriterion("PROJECT_ID  in ", values, "PROJECT_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdNotIn(List<Integer> values) {
            addCriterion("PROJECT_ID not in ", values, "PROJECT_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdBetween(Integer value1, Integer value2) {
            addCriterion("PROJECT_ID between ", value1, value2, "PROJECT_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andProjectIdNotBetween(Integer value1, Integer value2) {
            addCriterion("PROJECT_ID not between ", value1, value2, "PROJECT_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }
        public ProjectFamilyRelatedCriteria andFamilyIdIsNull() {
            addCriterion("FAMILY_ID is null");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdIsNotNull() {
            addCriterion("FAMILY_ID is not null");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdEqualTo(Integer value) {
            addCriterion("FAMILY_ID =", value, "FAMILY_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdNotEqualTo(Integer value) {
            addCriterion("FAMILY_ID <>", value, "FAMILY_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdGreaterThan(Integer value) {
            addCriterion("FAMILY_ID >", value, "FAMILY_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("FAMILY_ID >=", value, "FAMILY_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdLessThan(Integer value) {
            addCriterion("FAMILY_ID <", value, "FAMILY_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdLessThanOrEqualTo(Integer value) {
            addCriterion("FAMILY_ID <=", value, "FAMILY_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdLike(Integer value) {
            addCriterion("FAMILY_ID like ", value, "FAMILY_ID", 1);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdNotLike(Integer value) {
            addCriterion("FAMILY_ID  not like ", value, "FAMILY_ID", 1);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdLeftLike(Integer value) {
            addCriterion("FAMILY_ID like ", value, "FAMILY_ID", 0);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdNotLeftLike(Integer value) {
            addCriterion("FAMILY_ID  not like ", value, "FAMILY_ID", 0);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdRightLike(Integer value) {
            addCriterion("FAMILY_ID like ", value, "FAMILY_ID", 2);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdNotRightLike(Integer value) {
            addCriterion("FAMILY_ID  not like ", value, "FAMILY_ID", 2);
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdIn(List<Integer> values) {
            addCriterion("FAMILY_ID  in ", values, "FAMILY_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdNotIn(List<Integer> values) {
            addCriterion("FAMILY_ID not in ", values, "FAMILY_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdBetween(Integer value1, Integer value2) {
            addCriterion("FAMILY_ID between ", value1, value2, "FAMILY_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

        public ProjectFamilyRelatedCriteria andFamilyIdNotBetween(Integer value1, Integer value2) {
            addCriterion("FAMILY_ID not between ", value1, value2, "FAMILY_ID");
            return (ProjectFamilyRelatedCriteria) this;
        }

    }

    public static class ProjectFamilyRelatedCriteria extends GeneratedCriteria {

        protected ProjectFamilyRelatedCriteria() {
            super();
        }
    }

    public static class ProjectFamilyRelatedCriterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected ProjectFamilyRelatedCriterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }
        protected ProjectFamilyRelatedCriterion(String condition, Object value, int likeType) {
            this.condition = condition;
            if (likeType == 0) {
                this.value = "%" + value;
            }
            else if (likeType == 1) {
                this.value = "%" + value + "%";
            }
            else {
                this.value = value + "%";
            }
            this.typeHandler = null;
            this.singleValue = true;

        }

        protected ProjectFamilyRelatedCriterion(String condition, Object value,
                String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            }
            else {
                this.singleValue = true;
            }
        }

        protected ProjectFamilyRelatedCriterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected ProjectFamilyRelatedCriterion(String condition, Object value,
                Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected ProjectFamilyRelatedCriterion(String condition, Object value,
                Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}